package com.thenmorethings.service.impl;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.thenmorethings.dao.ImgDao;
import com.thenmorethings.entity.PageImg;
import com.thenmorethings.service.ImgService;

@Service("imgService")
public class ImgServiceImpl implements ImgService{

	@Resource
	private ImgDao imgDao;
	
	
	@Override
	public void save(PageImg pageImg) {
		imgDao.save(pageImg);
	}

	@Override
	public List<PageImg> findAll() {
		return imgDao.findObjects();
	}

	@Override
	public PageImg findById(Serializable id) {
		PageImg pageImg = imgDao.findObjectById(id);
		return pageImg;
	}

	@Override
	public void updateImg(PageImg pageImg) {
		imgDao.update(pageImg);
	}

	@Override
	public void deleteImg(Serializable id) {
		imgDao.deleteById(id);
	}

}
